#include <iostream>
using namespace std;


int main () {
    int a,b,c;
    cin >> a >> b >> c;
    int ans = a / 10 * 2 +b/10*3 + c/10*5;
    cout << ans;
    
    return 0;
}
